package com.bw.base.http

import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class RetrofitManager {
    companion object{
        fun getRetrofit(): Retrofit {
            val okHttpClient= OkHttpClient.Builder()
                .addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
                .build();


            var retrofit=Retrofit.Builder()
                .baseUrl("http://10.161.9.80:7015/")
                .client(okHttpClient)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
            return retrofit
        }
    }
}